package com.stlm2.dems.user.entity;

/**
 * Created by ZLQ on 2017/7/25.
 */
public enum AllRole {

    Consumer(1) {
        public String toString() {
            return "普通用户";
        }
    },
    StockClerk(2) {
        public String toString() {
            return "仓库人员";
        }
    },
    StockClerkAdmin(3) {
        public String toString() {
            return "仓库主管";
        }
    },
    CustomerService(4) {
        public String toString() {
            return "客服人员";
        }
    },
    CustomerServiceAdmin(5) {
        public String toString() {
            return "客服主管";
        }
    },
    Financial(6) {
        public String toString() {
            return "财务人员";
        }
    },
    FinancialAdmin(7) {
        public String toString() {
            return "财务主管";
        }
    },
    Operation(8) {
        public String toString() {
            return "运营人员";
        }
    },
    OperationAdmin(9) {
        public String toString() {
            return "运营主管";
        }
    },
    ShopAdmin(10) {
        public String toString() {
            return "店铺管理员";
        }
    },
    SystemAdmin(14) {
        public String toString() {
            return "系统管理员";
        }
    },
    SuperSystemAdmin(15) {
        public String toString() {
            return "超级系统管理员";
        }
    };
    private final int val;

    AllRole(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static AllRole getByIntValue(int n) {
        switch (n) {
            case 1:
                return Consumer;
            case 2:
                return StockClerk;
            case 3:
                return StockClerkAdmin;
            case 4:
                return CustomerService;
            case 5:
                return CustomerServiceAdmin;
            case 6:
                return Financial;
            case 7:
                return FinancialAdmin;
            case 8:
                return Operation;
            case 9:
                return OperationAdmin;
            case 10:
                return ShopAdmin;
            case 14:
                return SystemAdmin;
            case 15:
                return  SuperSystemAdmin;

            default:
                return null;
        }
    }
}
